temp=input().upper()
value=temp[:-1]
if 'F' in temp:
    value_1 = (float(value) - 32) / 1.8
    print(f'{value_1:.2f}C')
else:
    value_2=float(value)*1.8+32
    print(f'{value_2:.2f}F')

